package com.nefu.huiyi.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("admin")
public class Admin {

    @Schema(description = "管理员ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "关联的用户ID")
    @TableField("user_id")
    private Integer userId; // 关联到 User 表的 id

    @Schema(description = "管理员姓名")
    @TableField("name")
    private String name;

    @Schema(description = "管理员电话")
    @TableField("phone")
    private String phone;

    @Schema(description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

}
